package com.yc.service.impl;

import com.yc.mapper.UserMapper;
import com.yc.model.User;
import com.yc.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class UserServiceImpl implements IUserService {

    @Autowired
    private UserMapper userMapper;


    @Override
    public int save(String username, String password) {
      return   userMapper.save(username,password);
    }


    @Override
    public User find(String username) {
        return userMapper.findByUsername(username);
    }
}
